In [1]:
!!from time import sleep
for i in range(0, 100):
print(i)
sleep(0.1)
You can configure the summarization settings via the environment variable lc_wrapper.
In [2]:
%env lc_wrapper=4:4:4:4
In [3]:
!!from time import sleep
for i in range(0, 100):
print(i)
sleep(0.1)
The .log directory is created and the whole of output are recorded on a log file in this directory.
The filename is recorded on output area like above.
In [4]:
!cat /notebooks/.log/20170704/20170704-071348-0190.log
In [5]:
def do_something():
return "output something"
In [6]:
do_something()
Out[6]:
In [7]:
!!from time import sleep
for i in range(0, 100):
print(i)
sleep(0.1)
do_something()
Out[7]:
In [8]:
!cat /notebooks/.log/20170704/20170704-071448-0119.log
In [9]:
!!from time import sleep
from datetime import datetime
import pandas as pd
items = []
for i in range(0, 100):
print(i)
sleep(0.1)
items.append((i, datetime.now()))
pd.DataFrame(items, columns=['Index', 'Datetime'])
Out[9]:
In [10]:
!cat /notebooks/.log/20170704/20170704-071539-0790.log
In [11]:
%matplotlib inline
In [12]:
!!from time import sleep
from datetime import datetime
import pandas as pd
items = []
for i in range(0, 100):
print(i)
sleep(0.1)
items.append((datetime.now(), i))
pd.DataFrame(items, columns=['Datetime', 'Index']).set_index('Datetime').plot()
Out[12]:
In [13]:
!cat /notebooks/.log/20170704/20170704-071619-0567.log
In [14]:
!!from time import sleep
for i in range(0, 100):
print(i)
sleep(0.1)
# Always raises AssertionError
assert False
In [15]:
!cat /notebooks/.log/20170704/20170704-071647-0970.log
In [ ]: